const EnumRole=Object.freeze({
    "Harvest":"harvest",
    "Butler":"butler",
    "Engineer":"engineer",
    "Defense":"defense",
    "Reserve":"reserve",
    "OutHarvest":"out-harvest",
    "OutEngineer":"out-engineer",
    "OutTrans":"out-trans",
    "OutWorker":"out-worker",
    "Attack":"attack",
    "Heal":"heal",
    "Shield":"shield",
    "Occupy":"occupy",
})

const EnumHarvestMode=Object.freeze({
    "HarvestAndTrans":1,
    "OnlyHarvest":2
})

const EnumCreepBody=Object.freeze({
    "Harvest-lv1":[...Array(1).fill(CARRY),...Array(2).fill(WORK),...Array(1).fill(MOVE)],
    "Harvest-lv2":[...Array(5).fill(WORK),...Array(1).fill(MOVE)],
    "Harvest-lv3":[...Array(6).fill(WORK),...Array(3).fill(MOVE)],
    "Harvest-lv4":[...Array(3).fill(CARRY),...Array(5).fill(WORK),...Array(3).fill(MOVE)],
    "Harvest-lv5":[...Array(4).fill(CARRY),...Array(5).fill(WORK),...Array(3).fill(MOVE)],
    "Harvest-lv6":[...Array(4).fill(CARRY),...Array(5).fill(WORK),...Array(3).fill(MOVE)],
    "Harvest-lv7":[...Array(4).fill(CARRY),...Array(5).fill(WORK),...Array(3).fill(MOVE)],
    "Harvest-lv8":[...Array(4).fill(CARRY),...Array(5).fill(WORK),...Array(3).fill(MOVE)],

    "Butler-lv1":[...Array(4).fill(CARRY),...Array(2).fill(MOVE)],
    "Butler-lv2":[...Array(7).fill(CARRY),...Array(4).fill(MOVE)],
    "Butler-lv3":[...Array(10).fill(CARRY),...Array(5).fill(MOVE)],
    "Butler-lv4":[...Array(17).fill(CARRY),...Array(9).fill(MOVE)],
    "Butler-lv5":[...Array(17).fill(CARRY),...Array(9).fill(MOVE)],
    "Butler-lv6":[...Array(17).fill(CARRY),...Array(9).fill(MOVE)],
    "Butler-lv7":[...Array(17).fill(CARRY),...Array(9).fill(MOVE)],
    "Butler-lv8":[...Array(17).fill(CARRY),...Array(9).fill(MOVE)],

    // "Butler-lv6":[...Array(30).fill(CARRY),...Array(15).fill(MOVE)],
    // "Butler-lv7":[...Array(33).fill(CARRY),...Array(17).fill(MOVE)],
    // "Butler-lv8":[...Array(25).fill(CARRY),...Array(25).fill(MOVE)],

    "Engineer-lv1":[...Array(2).fill(CARRY),...Array(1).fill(WORK),...Array(2).fill(MOVE)],
    "Engineer-lv2":[...Array(3).fill(CARRY),...Array(3).fill(WORK),...Array(2).fill(MOVE)],
    "Engineer-lv3":[...Array(4).fill(CARRY),...Array(4).fill(WORK),...Array(4).fill(MOVE)],
    "Engineer-lv4":[...Array(6).fill(CARRY),...Array(6).fill(WORK),...Array(6).fill(MOVE)],
    "Engineer-lv5":[...Array(6).fill(CARRY),...Array(6).fill(WORK),...Array(6).fill(MOVE)],
    "Engineer-lv6":[...Array(6).fill(CARRY),...Array(6).fill(WORK),...Array(6).fill(MOVE)],
    "Engineer-lv7":[...Array(6).fill(CARRY),...Array(6).fill(WORK),...Array(6).fill(MOVE)],
    "Engineer-lv8":[...Array(6).fill(CARRY),...Array(6).fill(WORK),...Array(6).fill(MOVE)],

    // "Engineer-lv6":[...Array(10).fill(CARRY),...Array(12).fill(WORK),...Array(11).fill(MOVE)],
    // "Engineer-lv7":[...Array(13).fill(CARRY),...Array(20).fill(WORK),...Array(17).fill(MOVE)],
    // "Engineer-lv8":[...Array(13).fill(CARRY),...Array(20).fill(WORK),...Array(17).fill(MOVE)],

    "Defense-lv1":[...Array(4).fill(TOUGH),...Array(2).fill(MOVE),...Array(2).fill(ATTACK)],
    "Defense-lv2":[...Array(3).fill(TOUGH),...Array(4).fill(MOVE),...Array(5).fill(ATTACK)],
    "Defense-lv3":[...Array(4).fill(TOUGH),...Array(5).fill(MOVE),...Array(6).fill(ATTACK)],
    "Defense-lv4":[...Array(10).fill(TOUGH),...Array(10).fill(MOVE),...Array(10).fill(ATTACK)],
    "Defense-lv5":[...Array(12).fill(TOUGH),...Array(12).fill(MOVE),...Array(12).fill(ATTACK)],
    "Defense-lv6":[...Array(15).fill(TOUGH),...Array(15).fill(MOVE),...Array(15).fill(ATTACK)],
    "Defense-lv7":[...Array(10).fill(TOUGH),...Array(17).fill(MOVE),...Array(33).fill(ATTACK)],
    "Defense-lv8":[...Array(10).fill(TOUGH),...Array(17).fill(MOVE),...Array(33).fill(ATTACK)],

    "Reserve-lv3":[...Array(1).fill(CLAIM),...Array(1).fill(MOVE)],
    "Reserve-lv4":[...Array(2).fill(CLAIM),...Array(2).fill(MOVE)],
    "Reserve-lv5":[...Array(2).fill(CLAIM),...Array(2).fill(MOVE)],
    "Reserve-lv6":[...Array(3).fill(CLAIM),...Array(3).fill(MOVE)],
    "Reserve-lv7":[...Array(8).fill(CLAIM),...Array(8).fill(MOVE)],
    "Reserve-lv8":[...Array(11).fill(CLAIM),...Array(11).fill(MOVE)],

    "OutHarvest-lv1":[...Array(2).fill(WORK),...Array(2).fill(MOVE)],
    "OutHarvest-lv2":[...Array(4).fill(WORK),...Array(3).fill(MOVE)],
    "OutHarvest-lv3":[...Array(5).fill(WORK),...Array(5).fill(MOVE)],
    "OutHarvest-lv4":[...Array(8).fill(WORK),...Array(8).fill(MOVE)],
    "OutHarvest-lv5":[...Array(11).fill(WORK),...Array(11).fill(MOVE)],
    "OutHarvest-lv6":[...Array(15).fill(WORK),...Array(15).fill(MOVE)],
    "OutHarvest-lv7":[...Array(30).fill(WORK),...Array(15).fill(MOVE)],
    "OutHarvest-lv8":[...Array(30).fill(WORK),...Array(15).fill(MOVE)],

    "OutEngineer-lv1":[...Array(1).fill(CARRY),...Array(2).fill(WORK),...Array(1).fill(MOVE)],
    "OutEngineer-lv2":[...Array(3).fill(CARRY),...Array(3).fill(WORK),...Array(2).fill(MOVE)],
    "OutEngineer-lv3":[...Array(4).fill(CARRY),...Array(4).fill(WORK),...Array(4).fill(MOVE)],
    "OutEngineer-lv4":[...Array(6).fill(CARRY),...Array(6).fill(WORK),...Array(6).fill(MOVE)],
    "OutEngineer-lv5":[...Array(8).fill(CARRY),...Array(8).fill(WORK),...Array(8).fill(MOVE)],
    "OutEngineer-lv6":[...Array(10).fill(CARRY),...Array(12).fill(WORK),...Array(11).fill(MOVE)],
    "OutEngineer-lv7":[...Array(13).fill(CARRY),...Array(20).fill(WORK),...Array(17).fill(MOVE)],
    "OutEngineer-lv8":[...Array(13).fill(CARRY),...Array(20).fill(WORK),...Array(17).fill(MOVE)],

    "OutTrans-lv1":[...Array(4).fill(CARRY),...Array(2).fill(MOVE)],
    "OutTrans-lv2":[...Array(7).fill(CARRY),...Array(4).fill(MOVE)],
    "OutTrans-lv3":[...Array(10).fill(CARRY),...Array(5).fill(MOVE)],
    "OutTrans-lv4":[...Array(17).fill(CARRY),...Array(9).fill(MOVE)],
    "OutTrans-lv5":[...Array(24).fill(CARRY),...Array(12).fill(MOVE)],
    "OutTrans-lv6":[...Array(30).fill(CARRY),...Array(15).fill(MOVE)],
    "OutTrans-lv7":[...Array(33).fill(CARRY),...Array(17).fill(MOVE)],
    "OutTrans-lv8":[...Array(33).fill(CARRY),...Array(17).fill(MOVE)],

    "Attack-lv4":[...Array(5).fill(TOUGH),...Array(5).fill(MOVE),...Array(5).fill(ATTACK),...Array(5).fill(MOVE)],
    "Attack-lv5":[...Array(5).fill(TOUGH),...Array(10).fill(MOVE),...Array(5).fill(MOVE),...Array(10).fill(ATTACK)],
    "Attack-lv6":[...Array(5).fill(TOUGH),...Array(15).fill(MOVE),...Array(15).fill(ATTACK),...Array(5).fill(MOVE)],
    "Attack-lv7":[...Array(5).fill(TOUGH),...Array(20).fill(MOVE),...Array(20).fill(ATTACK),...Array(5).fill(MOVE)],
    "Attack-lv8":[...Array(5).fill(TOUGH),...Array(20).fill(MOVE),...Array(20).fill(ATTACK),...Array(5).fill(MOVE)],

    "Heal-lv4":[...Array(4).fill(HEAL),...Array(4).fill(MOVE)],
    "Heal-lv5":[...Array(6).fill(HEAL),...Array(6).fill(MOVE)],
    "Heal-lv6":[...Array(7).fill(HEAL),...Array(7).fill(MOVE)],
    "Heal-lv7":[...Array(16).fill(HEAL),...Array(16).fill(MOVE)],
    "Heal-lv8":[...Array(25).fill(HEAL),...Array(25).fill(MOVE)],

    "Shield-OnlyDefense":[...Array(40).fill(TOUGH),...Array(10).fill(MOVE)],
    "Shield-Defense-One-Half":[...Array(5).fill(TOUGH),...Array(7).fill(HEAL),...Array(6).fill(MOVE)],
    "Shield-Defense-One":[...Array(20).fill(TOUGH),...Array(13).fill(HEAL),...Array(17).fill(MOVE)],
    "Shield-Defense-Two":[...Array(8).fill(TOUGH),...Array(25).fill(HEAL),...Array(17).fill(MOVE)],

    "Occupy-lv1":[...Array(1).fill(CLAIM),...Array(1).fill(MOVE)],
    "Occupy-lv2":[...Array(1).fill(CLAIM),...Array(1).fill(MOVE)],
    "Occupy-lv3":[...Array(1).fill(CLAIM),...Array(1).fill(MOVE)],
    "Occupy-lv4":[...Array(1).fill(CLAIM),...Array(1).fill(MOVE)],
    "Occupy-lv5":[...Array(1).fill(CLAIM),...Array(1).fill(MOVE)],
    "Occupy-lv6":[...Array(1).fill(CLAIM),...Array(1).fill(MOVE)],
    "Occupy-lv7":[...Array(1).fill(CLAIM),...Array(1).fill(MOVE)],
    "Occupy-lv8":[...Array(1).fill(CLAIM),...Array(1).fill(MOVE)],

    "OutWorker-lv1":[...Array(2).fill(WORK),...Array(2).fill(MOVE)],
    "OutWorker-lv2":[...Array(4).fill(WORK),...Array(3).fill(MOVE)],
    "OutWorker-lv3":[...Array(5).fill(WORK),...Array(5).fill(MOVE)],
    "OutWorker-lv4":[...Array(8).fill(WORK),...Array(8).fill(MOVE)],
    "OutWorker-lv5":[...Array(11).fill(WORK),...Array(11).fill(MOVE)],
    "OutWorker-lv6":[...Array(15).fill(WORK),...Array(15).fill(MOVE)],
    "OutWorker-lv7":[...Array(30).fill(WORK),...Array(15).fill(MOVE)],
    "OutWorker-lv8":[...Array(30).fill(WORK),...Array(15).fill(MOVE)],
})


const EnumBehavior=Object.freeze({
    "Free":0,
    "Harvest":1,
    "ReplenishEnergy":2,
    "ReplenishBuild":5,
    "PickEnergy":6,
    "RepairBuild":7,
    "UpController":8,
    "Building":9,
    "TransMineral":10,
    "StopCar":11,
    "TransLink":12,
    "TransContainer":13,
    "TransMineralToTerminal":14,
    "AttackCreep":21,
    "AttackBuild":22,
    "AttackTower":23,
    "AttackController":25,
    "HealCreep":26,
})


const EnumReplenish=Object.freeze({
    "Free":0,
    "ReplenishEnergy":1,
    "WithDrawOtherCreep":2,
    "PickEnergy":3,
})

const EnumFlag=Object.freeze({
    "Occupy":COLOR_PURPLE,
    "UpRoot":COLOR_YELLOW,
    "UpRootTo":COLOR_ORANGE,
    "Reserve":COLOR_BLUE,
    "Trans":COLOR_GREY,
    "Remove":COLOR_WHITE,
    "Attack":COLOR_RED,
    "Stop":COLOR_GREEN
})

module.exports={EnumRole,EnumBehavior,EnumHarvestMode,EnumCreepBody,EnumFlag,EnumReplenish}